<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>显示和隐藏元素</title>
    <script type="text/javascript" src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
<div id="ghost">
    <div v-if="isNight">我是幽灵！嘘！</div>
</div>

<script>
    new Vue({
        el: '#ghost',
        computed: {
            isNight(){
                return new Date().getHours() < 7;
//                return (new Date('4 January 03:30')).getHours() < 7;
            }
        }
    })
</script>

</body>
</html>